/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.rbh.risk.service.impl;

import com.rbh.risk.dao.PersonImpactedDao;
import com.rbh.risk.entity.PersonImpacted;
import com.rbh.risk.service.PersonImpactedService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service("personImpactedService")
public class PersonImpactedServiceImpl implements PersonImpactedService {

    @Autowired
    private PersonImpactedDao personImpactedDao;

    @Transactional(readOnly = false)
    @Override
    public void insert(PersonImpacted personImpacted) {
        this.personImpactedDao.insert(personImpacted);
    }

    @Transactional(readOnly = false)
    @Override
    public void update(PersonImpacted personImpacted) {
        this.personImpactedDao.update(personImpacted);
    }

    @Transactional(readOnly = false)
    @Override
    public void delete(PersonImpacted personImpacted) {
        this.personImpactedDao.delete(personImpacted);
    }

    @Transactional(readOnly = true)
    @Override
    public PersonImpacted getById(Short personalImpactId) {
        return this.personImpactedDao.getById(personalImpactId);
    }

    @Transactional(readOnly = true)
    @Override
    public List<PersonImpacted> getAll() {
        return this.personImpactedDao.getAll();
    }
}
